home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
eulisp
/
mpfeel.lha
/
MPFeel
/
Plurals
/
mp_eubang.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-15
|
5KB
|
204 lines
/*
* Plurals
*
* Author: S.C.Merrall
*
* File: mp_eubang.h
*
* Contents:
*
* Description: This is the point of contact of the front end
* with the back end of the plurals interface.
*
* Change History:
*
* Date Name Comment
* -------- ---- -------
* 21:05:91 SCM Created
* 22:05:91 SCM included constant.h and mp_type.h, added MASPAR_CONFIG
* 23:05:91 SCM Added mp_error for error handling between ends
* 26:01:92 SCM Added mp_gc, this will probably need to be removed later
* 26:03:92 SCM Added mp_free_plurals, called by fe_gc
* 26:03:92 SCM Removed cm_identifym superceded by cm_put and cm_start
* 08:04:92 SCM plural space now visible to implement temp pspace in lisp
*/
/* Include Some other useful headers here
* This way we only have to include mp_eubang.h in eubang.c
*/
#include "constant.h" /* So we know the scratch space size */
#include "mp_type.h" /* So we can share the unique type ids */
#include "mp_arith.h" /* So we know the bin-op ids */
#define MASPAR_CONFIG 1024 /* Have to tell the front end for its
* scratch space. Put check in mp_init
* to make sure they agree.
*/
#define MASPAR_XLEN 32
#define MASPAR_YLEN 32
/* Failure is indicated by returning NULL/FAIL
* The specific nature of the failure can be indicated by setting
* mp_error, which is visible to the front end.
*/
extern int private_nproc;
extern int mp_error;
/* Error codes */
/* ===== ===== */
#define MP_WRONG_MASPAR_CONFIG 999 /* Front end code compiled for wrong
* Maspar Configuration
*/
#define UNKNOWN_TYPE 997 /* Unsupported type sent to encoder */
#define EXCEEDED_SCRATCH_SPACE 996 /* Ran out of space whilst encoding */
#define MP_COPY_IN_FAILED 995 /* botch in cifer or plural free */
#define MP_ALLOC_PLURAL_FAILED 800
#define MP_NONCONFORMANT_ARGS 801
#define MP_INDEX_OUTSIDE_PLURAL 802
#define MP_READ_FROM_FE_FAIL 803
#define MP_BUILD_STRUCTURE_FAIL 804
#define MP_MAKE_STACK_FAILED 806
#define MP_ALLOC_STACK_FAILED 807
#define MP_CAR_OF_CONTEXT_FAIL 808
#define MP_ALLOC_CONTEXT_FAILED 809
#define MP_CAR_OF_MAP_FAILED 810
#define MP_CDR_OF_MAP_FAILED 811
#define MP_DECODE_IN_MOVE_FAILED 812
#define MP_MAP_SOURCE_NOT_INTS 813
#define MP_MAP_DEST_NOT_INTS 814
#define MP_CONS_COLLISIONS_FAILED 815
#define MP_DECODE_IN_GET_FAILED 816
#define MP_CONS_FAILED 700
#define MP_CAR_FAILED 701
#define MP_CDR_FAILED 702
#define MP_RPLAC_A_FAILED 703
#define MP_RPLAC_D_FAILED 704
#define MP_IF_FAILED 600
#define MP_FI_FAILED 601
#define MP_ELSE_FAILED 602
#define MP_ASSIGN_FAILED 603
#define MP_CONTEXT 604
#define MP_AND_FAILED 605
#define MP_OR_FAILED 606
#define MP_ELIF_FAILED 607
#define MP_NOT_FAILED 608
#define MP_BIN_OP_FAILED 500
#define MP_INT_BIN_OP_FAILED 500
#define MP_UN_OP_FAILED 501
#define MP_REL_OP_FAILED 502
#define MP_RND_FAILED 503
#define MP_TEST_FAILED 400
#define MP_EQ_FAILED 401
#define MP_MAKE_VECTOR_FAILED 300
#define MP_VECTOR_LENGTH_FAILED 301
#define MP_VECTOR_REF_FAILED 302
#define MP_VECTOR_SET_FAILED 303
#define MP_VECTOR_MERGE_FAILED 304
/* Visible thingies */
/* ======= ======== */
extern unsigned short plural_space;
extern unsigned short stack_base;
#ifdef __STDC__
extern char *mp_make_plural( char *, int );
extern int mp_make_context( char *, int );
extern int mp_plural( int, int, int, char *, ... );
extern char *mp_init_plural( void );
extern int mp_length( char * );
extern int mp_match(char *, int, char *, int);
extern int mp_move(char *, int, char *, int, int);
extern void mp_gc( void );
extern int mp_free_plurals( char *, int );
extern int cm_put( char *, int, int, char * );
extern int cm_start( char * );
extern mp_xnet( char *, int, int, char * );
extern mp_edge( char *, int );
#else
extern char *mp_make_context();
extern int mp_make_plural();
extern int mp_plural();
extern char *mp_init_plural();
extern int mp_length();
extern int mp_match();
extern int mp_move();
extern void mp_gc();
extern int mp_free_plurals();
extern int cm_put();
extern int cm_start();
extern int mp_xnet();
extern int mp_edge();
#endif
/* Unique Operator ID's */
/* ====== ======== ==== */
#define MP_PRINT 100
#define MP_X_STAT 101
#define MP_MP_CONS 200
#define MP_CAR 201
#define MP_CDR 202
#define MP_RPLAC_A 203
#define MP_RPLAC_D 204
#define MP_SET 300
#define MP_REF 301
#define MP_BANG 400
#define MP_IF 500
#define MP_FI 501
#define MP_ELSE 502
#define MP_ASSIGN 503
#define MP_REDUCE_OR 504
#define MP_AND 505
#define MP_OR 506
#define MP_ELIF 507
#define MP_NOT 508
#define MP_INT_BIN_OP 600
#define MP_FLOAT_BIN_OP 601
#define MP_BIN_OP 602
#define MP_UN_OP 603
/*#define MP_SCAN_OP 604 used by MP_CONTEXT */
#define MP_REL_OP 605
#define MP_SCAN_OP 606
#define MP_RANDOM 607
#define MP_TEST 700
#define MP_EQ 701
#define MP_MAKE_VECTOR 800
#define MP_VECTOR_LENGTH 801
#define MP_VECTOR_REF 802
#define MP_VECTOR_SET 803
#define MP_VECTOR_MERGE 804
#define MP_GREEN 0